package com.asen.business.commons.domain;

import com.asen.commons.annotation.FieldEnum;
import com.asen.commons.core.base.enums.BillStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 核心单据DO
 *
 * @author Gary
 * @version 1.0
 * @date 2018-11-12
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper=true)
public abstract class CoreBill extends Bill {

    public CoreBill(Long id) {
        super(id);
    }

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "业务日期", position = 986, example = "yyyy-MM-dd")
    private Date bizDate;

    @FieldEnum(BillStatusEnum.class)
    @ApiModelProperty(value = "状态", position = 987, example = "0--新增,1--已保存,2--已提交,3--已审核,4--审批中,5--修改中,90--已完结,99--已作废")
    private Integer status;

    @ApiModelProperty(value = "审核人id", position = 988)
    private Long auditById;

    @ApiModelProperty(value = "审核人", position = 989)
    private String auditByName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "审核时间", position = 990, example = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;
}
